import { NzMessageService } from 'ng-zorro-antd/message';
import { Component, OnInit } from '@angular/core';
import { NzModalRef } from 'ng-zorro-antd/modal';

@Component({
  templateUrl: './create-folder.component.html',
  styleUrls: ['./create-folder.component.scss']
})
export class CreateFolderComponent implements OnInit {

  name: string = '';

  constructor(
    private modal: NzModalRef,
    private message: NzMessageService
  ) { }

  ngOnInit(): void {
  }

  confirm():void{
    if(this.name.trim()){
      this.modal.triggerOk();
      this.modal.close;
      this.modal.destroy();
    }else{
      this.message.error("请正确输入目录名称");
    }

  }
  cancel():void{
    this.modal.close();
    this.modal.destroy();
  }

}
